# 1 "ramfs.c"
# 1 "/home/diego/sodium/fs//"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "ramfs.c"






# 1 "../include/fs/ramfs.h" 1







# 1 "../include/kernel/definiciones.h" 1
# 14 "../include/kernel/definiciones.h"
# 1 "../include/usr/tipos.h" 1
# 15 "../include/usr/tipos.h"
typedef unsigned int dword;
typedef unsigned short word;
typedef unsigned char byte;

typedef unsigned char u8;
typedef signed char s8;
typedef unsigned short u16;
typedef signed short s16;
typedef unsigned int u32;
typedef signed int s32;


typedef struct _u80 { unsigned int word[20]; } u80;
# 15 "../include/kernel/definiciones.h" 2
# 62 "../include/kernel/definiciones.h"
char stArgAux[128];
# 9 "../include/fs/ramfs.h" 2
# 30 "../include/fs/ramfs.h"
typedef struct {
 char strNombreArchivo[11];
 word wSeg;
 word wOff;
 dword dwTamanio;
} __attribute__((packed)) stEntradaLS;




typedef struct {
 stEntradaLS stEnt[20];
} __attribute__((packed)) stDirectorio;




typedef struct {
 char strEtiqueta[20];
 char strPMontaje[44];
 dword dwDireccionInicial;
 dword dwTamanio;
 stDirectorio *pstDirRaiz;
 dword dwEntradasRaiz;
 u8 bActivo;
} stDiscoRAM;

int iFnRamFsInit(void);

int iFnNormalizarNomArch(const char *strNomArch83, char *strNomArch);

int iFnBuscarArchivo(stDirectorio * pstDir, char *strNombreArchivo, stEntradaLS ** ppstEntradaLSArchEnc);

int iFnObtenerDirectorio(char *strPMontaje, stDirectorio ** ppstDir);

int iFnObtenerDisco(char *strPMontaje, stDiscoRAM **ppstDisco);

int iFnRamFsLs(char *strParams);
# 8 "ramfs.c" 2
# 1 "../include/kernel/libk/libk.h" 1
# 15 "../include/kernel/libk/libk.h"
dword dwFnCtod (char *stBuffer);
word wFnCtow (char *stBuffer);
byte byFnCtob (char *stBuffer);

int iFnDwtoBin (unsigned int uiNro, char *cCadenaDevualta);
int iFnDwtoOct (unsigned int uiNro, char *cCadenaDevualta);

void vFnItoa (int iNumero, char *stBuffer);
void vFnItoh (int iNumero, char *stBuffer);

void vFnWtoa (word wNumero, char *stBuffer);
void vFnWtoh (word wNumero, char *stBuffer);

void vFnBtoa (byte byNumero, char *stBuffer);
void vFnBtoh (byte byNumero, char *stBuffer);

int iFnHtoi (char *c);
int iFnCtoi (char *stBuffer);
int iFnXtoi (char *c);

extern void vFnFtoa(char *stBuffer, double fNumero, int iPrecision);
extern double fFnAtof(const char *stBuffer);
# 9 "ramfs.c" 2
# 1 "../include/kernel/libk/string.h" 1
# 9 "../include/kernel/libk/string.h"
inline unsigned char* ucpFnCopiarMemoria(unsigned char *ucpDestino,
      unsigned char *ucpOrigen,
      unsigned int uiTamanio);
inline unsigned char* ucpFnMemSetCero(unsigned char *ucpDirInicio,
                  unsigned int uiTamanio );

int iFnLongitudCadena (const char *cnstCadena);
int iFnCompararCadenas (const char *, const char *);
int iFnCompararCadenas2 (const char *, const char *);
int iFnCopiaCaracter (char *, const char *);
int iFnCopiaCadena (char *, const char *);

int iFnCopiaEntero (char *, const int);
int iFnCopiaFloat (char *, const float, const int);
int iFnCopiaWord (char *, const word);
int iFnCopiaByte (char *, const byte);
int iFnCopiaHexa (char *, const int);
int iFnCopiaWordHexa (char *, const word);
int iFnCopiaByteHexa (char *, const byte);
void vFnImprimirString (char *, const char *, ...);
int iFnLongitudCadena (const char *);

int iFnCopiaCadena2 (char *, const char *);
char * pstFnConcatenarCadena (char * , char * );
int iFnBuscarEnCadena (char * , char * ,int );
char * pstFnCadenaIzquierda (char * , int );
char * pstFnCadenaDerecha (char * , int );
int iFnEsNumero (char * stCadena);

void vFnStrLwr (char * stCadena);
void vFnStrUpr (char * stCadena);
# 10 "ramfs.c" 2
# 1 "../include/kernel/mem/mem_part_kernel.h" 1



void* ptrHeapBajoKernel;
long int liTamanioHeapBajoKernel;

void* ptrHeapAltoUsuario;
long int liTamanioHeapAltoUsuario;


long int liTamFijaMemBaja;
long int liTamFijaMemAlta;
long int liTamanioSolicitado;

int iModoMemoriaKernel;
char stTamanioMemFija[20];
int iTamanioMemFijaSeteado;
int iPosicionSetMemFija;
int iContinuar;
int iModoFijoUser;

void vFnInicializarHeapsKernel();
void vFnConfigurarParticiones();

void * pvFnReservarParticionUsuario(unsigned int);
void * pvFnReservarParticionKernel(unsigned int);
void * pvFnRedimensionarSegmento(void*, unsigned long);
void vFnLiberarParticion( void * );
unsigned int uiHeapKernelInicializado;
unsigned int uiKernelStack;
# 11 "ramfs.c" 2

# 1 "../include/kernel/syscall.h" 1







# 1 "../include/kernel/signal.h" 1
# 9 "../include/kernel/syscall.h" 2
# 1 "../include/kernel/semaforo.h" 1
# 20 "../include/kernel/semaforo.h"
typedef struct
{
 int inicializado;
 int valor;
 unsigned long int head;
 unsigned long int tail;

 unsigned long int procesosEnCola;

 unsigned long int cola[5];
 unsigned long int pshared;
}semaforo;





typedef struct
{
 int sem_id;
}sem_t;





typedef struct{
 int pshared;
 unsigned int value;
} sem_init_params;


void vFnEncolarProceso(semaforo *sem, unsigned long int uliId);


void vFnInicializaCola(unsigned long int *cola);


int iFnHayProcesoEnEspera(semaforo *sem);


unsigned long int uliFnDesencolarProceso(semaforo *sem);


void vFnInicializarSemaforos();
# 77 "../include/kernel/semaforo.h"
int iFnSemInit(sem_t *sem, int pshared, unsigned int value);
# 86 "../include/kernel/semaforo.h"
int iFnSemClose(sem_t *sem);
# 106 "../include/kernel/semaforo.h"
int iFnSemWait(sem_t *sem);
# 116 "../include/kernel/semaforo.h"
int iFnSemPost(sem_t *sem);

int validaExistenciaSemaforo(sem_t *sem);


int agregarSemaforoAlSistema(int pshared, unsigned int value);

void vFnVerSemaforos();
# 10 "../include/kernel/syscall.h" 2
# 1 "../include/kernel/shm.h" 1
# 18 "../include/kernel/shm.h"
typedef unsigned int size_t;
typedef int key_t;
typedef int bool;


typedef struct _stuMemoriasAtachadas_
{
 bool utilizada;
 int posicionEnShMem;
 int posicionEnAttach;
}stuMemoriasAtachadas;


typedef struct _attach_
{
 int pid;
 void * ptrShAddr;

}attach;


typedef struct _shMem_
{
 key_t key;
 unsigned long int tamanio;
 attach procAtt[5];
 bool declarada;
}shMem;

shMem memoriasCompartidas[5];




int iFnShmGet(key_t key, size_t size);


int iFnShmAt(int shmid, void * shmAddr);


int iFnShmDt(int shmid);

int iFnShmDtProc(int shmid, unsigned int uiPid);
int iFnShmDtAllProc(unsigned int uiPid);

unsigned long ulFnMaxDirShmProc(unsigned int uiPid);

void vFnInicializarShms();
void vFnVerShm();




void vFnCopiarVariablesCompartidas();



void vFnCopiarVariable(void * dest, void * src, size_t tamanio);
# 11 "../include/kernel/syscall.h" 2
# 1 "../include/kernel/tiempo.h" 1
# 53 "../include/kernel/tiempo.h"
typedef unsigned long int time_t;
typedef unsigned long int clock_t;





typedef struct{

        clock_t tms_utime;


        clock_t tms_stime;


        clock_t tms_cutime;


        clock_t tms_cstime;
} tms;





typedef struct{

        int tz_minuteswest;


        int tz_dsttime;
} timezone;





typedef struct{

        unsigned long int tv_sec;


        unsigned long int tv_usec;
} timeval;





typedef struct{

        timeval it_interval;


        timeval it_value;
} itimerval;





typedef struct{

        int modes;


 long offset;


 long freq;


 long maxerror;


 long esterror;


 int status;


 long constant;


 long precision;


 long tolerance;


 timeval time;


 long tick;
} timex;





typedef struct{

        long int tv_sec;


        long int tv_nsec;
} timespec;
# 12 "../include/kernel/syscall.h" 2
# 195 "../include/kernel/syscall.h"
enum __ptrace_request {
 PTRACE_TRACEME,
 PTRACE_PEEKTEXT,
 PTRACE_PEEKDATA,
 PTRACE_PEEKUSER,
 PTRACE_POKETEXT,
 PTRACE_POKEDATA,
 PTRACE_POKEUSER,
 PTRACE_GETREGS,
 PTRACE_GETFPREGS,
 PTRACE_SETREGS,
 PTRACE_SETFPREGS,
 PTRACE_CONT,
 PTRACE_KILL,
 PTRACE_ATTACH,
 PTRACE_DETACH
};


typedef struct {
 int iPid;
 void *pvAddr;
 void *pvData;
}__ptrace_param;



typedef struct _stuRegs_
{
  long ebx;
  long ecx;
  long edx;
  long esi;
  long edi;
  long ebp;
  long eax;
  int xds;
  int xes;
  long orig_eax;
  long eip;
  int xcs;
  long eflags;
  long esp;
  int xss;
} stuRegs;






long lFnSysExit( int status );
long lFnSysFork();
long lFnSysTest( long num );
long lFnSysRead( int, void *buf, size_t count );
long lFnSysWrite( int, const void *buf, size_t count );
long lFnSysWaitPid( int pid, int *status, int options );
long lFnSysExecve( const char *filename, char *argv[], char *envp[] );
long lFnSysTime( long *t );
long lFnSysGetPid();
long lFnSysKill( int pid, int sig );
long lFnSysGetPPid();
long lFnSysReboot( int flag );
long lFnSysSodiumCallgate(int iOpcion, int iPar1, int iPar2);
long lFnSysBrk(unsigned long);
long lFnSysSBrk(unsigned long);
long lFnSysSemInit( sem_t *sem, sem_init_params * params);
long lFnSysSemPost( sem_t *sem );
long lFnSysSemWait( sem_t *sem );
long lFnSysSemClose( sem_t *sem );
long lFnSysShmGet( key_t key, size_t size );
long lFnSysShmAt( int shmid, void * shmAddr );
long lFnSysShmDt( key_t key );

int iFnSysSumar(int a, int b, int * res);



long lFnSysNice( int );
long lFnSysGetpriority( int, int );
long lFnSysSetpriority( int, int, int );
long lFnSysClone(stuRegs *,int flags);


long lFnSysIdle();



long lFnSysSchedSetParam(int p);
long lFnSysSchedGetParam();
long lFnSysSchedSetScheduler(int p);
long lFnSysSchedGetScheduler();
long lFnSysSchedYield();
long lFnSysSchedGetPriorityMax();
long lFnSysSchedGetPriorityMin();
long lFnSysSchedRrGetInterval();





long lFnSysStime(time_t *newtime);
long lFnSysTimes(tms *ptmsbuffer);
long lFnSysGettimeofday(timeval *ptimervalTp, timezone *ptimezoneTzp);
long lFnSysSettimeofday(timeval *ptimevalTp, timezone *ptimezoneTzp);
long lFnSysGettimer(int iWhich, itimerval *pitimervalValue);
long lFnSysSettimer(int iWhich, itimerval const *pcnitimervalValue, itimerval *ptimervalOvalue);
long lFnSysAdjtimex(timex *ptimexBuffer);
long lFnSysNanosleep(timespec const *pcntimespecRequested_time, timespec *ptimespecRemaining);



long lFnSysPtrace( int request, void *pvDirParam );





unsigned long ulFnSysBrk(unsigned long brk);
# 13 "ramfs.c" 2
# 1 "../include/shell/teclado.h" 1
# 509 "../include/shell/teclado.h"
char stBufferShell[256];

char stBufferTeclado[10];






struct _stuKeyCode {
    unsigned char tipo;
    unsigned char ascii;
};

typedef struct _stuKeyCode stuKeyCode;




struct _stuDefinicionTeclado {
    char sCodigo [5];
    char sNombre [25];
    stuKeyCode stashMatrizNormal [128];
    stuKeyCode stashMatrizShifted [128];
    stuKeyCode stashMatrizAltGred [128];
} __attribute__((packed));

typedef struct _stuDefinicionTeclado stuDefinicionTeclado;


void vFnManejadorTecladoShell (unsigned char ucScanCode);
void vFnScanCodeAKeyCode( stuKeyCode*, unsigned char );
void vFnScanCodeExtAKeyCode( stuKeyCode*, unsigned char );
void vFnKeyCodeNumPad( stuKeyCode* );
int iFnTeclaEspecial ( stuKeyCode, unsigned char );
int iFnCombinacionTeclasEspecial( stuKeyCode );
void * pvFnAbrirArchivoKeymap (void);
int iFnCambiaTecladoI(unsigned int);
int iFnCambiaTecladoS(char *);
void vFnListarKeymaps();
char cFnGetChar();
char cFnPausa();

int iCantidadCaracteres;
int iSemaforoBufferTeclado;
int iLlenarIndice;
static int staiVaciarIndice;
# 14 "ramfs.c" 2
# 1 "../include/shell/shell.h" 1
# 13 "../include/shell/shell.h"
void vFnManejadorTecladoShell(unsigned char scanCode);

char cFnGetch();
char cFnPausa();
int iFnGetArg(int iPos, int iNumero, char* stResultado, int iAnchoMaximo);
int iFnXtoI (char *c);
int iFnHtoI (char *c);

void vFnAPM_info();
void vFnAPM_shutdown();

void vFnLoopReloj();
void vFnImprimirMenu ();
void vFnImprimirContexto();
void vFnMenuInstanciarInit();
void vFnMostrarListaParticiones();
void vFnBorrarUltimaPartFija();
void vFnAgregarPartFija(char*);
void vFnResetearListaPart();
int iFnShellActivo();


void vFnImprimirMenu ();
void vFnImprimirSeparadores ();




void vFnShell ();
void vFnMenuAyuda ();



void vFnMenuDump (int,int);
void vFnMenuWriteArch(int,int);
void vFnMenuOptKill(int);
void iFnTomaPrimerPara();
void iFnTomaNParametro(int,char *);
void vFnConvierteACadena(int, char *);



void vFnMenuKill (int);
void vFnMenuKillSeg (int);
void vFnMenuMem ();
void vFnMenuVer ();
void vFnMenuDesc (int,int);
void vFnMenuEjecutar(int);
void vFnMenuStack (int,int);
void vFnMenuGdt ();
void vFnMenuIdt ();
void vFnMenuCambiaTeclado (int);
void vFnMenuCls ();
void vFnMenuTSS (int);
void vFnMenuBitmap ();
void vFnMenuSegs ();
void vFnMenuPag (int);
void vFnMenuPs ();
void vFnMenuExec (int,int);
void vFnMenuExecSeg (int,int);
void vFnMenuLeerArch(int);
void vFnMenuCheck (int);
void vFnMenuSet (int);
void vFnSumaFpu (int);
void vFnMenuSumaFpu(int,int);
void vFnMenuVerSemaforos();
void vFnMenuVerShm();
void vFnMenuTestptrace(int);
void vFnMenuFd ();
void vFnMenuLs (int);
void vFnMenuCD(int);
void vFnMenuRm(int);

void vFnTermLog (unsigned char ucCaracter);

char *cpFnGetEnv(char *cpVariable);
void vFnGetAllEnv();
void vFnSetEnv(char *cpVariable, char *cpValor);
void vFnUnSetEnv(char *cpVariable);



typedef struct {
 char cpVariable[32 +1];
 char cpValor[32 +1];
 int iActiva;
}stuENV;




void vFnInicializarEnv();

stuENV pstuENV[10];


unsigned long ulPidProcesoForeground;
unsigned long uiAPM_ok;
unsigned long uiAPM_check_ax;
unsigned long uiAPM_check_bx;
unsigned long uiAPM_check_cx;

unsigned long uiAPM_32_cs;
unsigned long uiAPM_offset_entry_point;
unsigned long uiAPM_16_cs;
unsigned long uiAPM_ds;
# 15 "ramfs.c" 2
# 1 "../include/shell/sys_video.h" 1







# 1 "../include/video.h" 1
# 58 "../include/video.h"
typedef char* va_list;
# 100 "../include/video.h"
int iFnImprimirCadenas (int,const char*);




void vFnImprimirEntero (int,const int);




void vFnImprimirFloat (int,const double, const int);




void vFnImprimirHexa (int,const int);




void vFnImprimirWordHexa (int,const word);




void vFnImprimirByteHexa (int,const byte);





void vFnImprimirWin (int,const char*, ... );
void vFnImprimir (const char*, ... );
void vFnImprimirI (const char*, ... );

extern char cFnSysObtenerColor(int);
extern void vFnSysSetearColor(int,char);
extern void vFnSysSetearX(int,int);
extern void vFnSysSetearY(int,int);
extern void vFnClsWin(int);





void vFnImprimirContextSwitch(int color,int pid, char* nombre, int indiceGDT);
void vFnImprimirPrompt();
void vFnImprimirOk(int linea);
void vFnImprimirNOk(int linea);

void vFnImprimirVentana (int hVentana, const char *cnstCadena, ...);






int bTerminalActiva;

void vFnCambiarTerminal(void);
void vFnLog (const char *cnstCadena, ...);

void vFnLogScrollArriba();
void vFnLogScrollAbajo();

void vFnLogScrollMaximo();
void vFnLogScrollMinimo();
void vFnLogBorrar();
# 9 "../include/shell/sys_video.h" 2
# 21 "../include/shell/sys_video.h"
typedef struct _stuVentana_
{
  int iCursorX;
  int iCursorY;
  char cColor;
  int iPosicionX;
  int iPosicionY;
  int iAncho;
  int iAlto;
}stuVentana;

void vFnTabulador (int);
void vFnNuevaLinea (int);
void vFnBorrarCaracter (int);
void vFnScroll (int);
inline void vFnPonerCaracter (int, int);
char cFnObtenerColor (int);
void vFnSysSetearColor (int, char);
void vFnSysSetearX (int, int);
void vFnSysSetearY (int, int);
void vFnCambiarVisibilidadVentanaProceso ();
void vFnClsWin (int);
# 16 "ramfs.c" 2



extern stuVentana pstuVentana[10];

stDiscoRAM stDiscosRAM[3];
# 41 "ramfs.c"
int iFnRamFsInit(void)
{
 stDiscoRAM *disco_usr;
 stDiscoRAM *disco_log;
 stDiscoRAM *disco_lotes;

 disco_usr = &stDiscosRAM[0];
 disco_log = &stDiscosRAM[1];
 disco_lotes = &stDiscosRAM[2];

 ucpFnCopiarMemoria((unsigned char *) disco_usr->strEtiqueta,
      (unsigned char *) "USR", 4);
 ucpFnCopiarMemoria((unsigned char *) disco_log->strEtiqueta,
      (unsigned char *) "LOGS", 5);
 ucpFnCopiarMemoria((unsigned char *) disco_lotes->strEtiqueta,
      (unsigned char *) "LOTES", 6);

 ucpFnCopiarMemoria((unsigned char *) &(disco_usr->strPMontaje),
      (unsigned char *) "/mnt/usr", 9);
 ucpFnCopiarMemoria((unsigned char *) &(disco_log->strPMontaje),
      (unsigned char *) "/mnt/log", 9);
 ucpFnCopiarMemoria((unsigned char *) &(disco_lotes->strPMontaje),
      (unsigned char *) "/mnt/lotes", 10);




 disco_usr->dwTamanio = 100 * 1024;

 if ((disco_usr->dwDireccionInicial =
      (dword) pvFnReservarParticionUsuario(disco_usr->dwTamanio)) == 0) {
  vFnImprimir
      ("\nNo se pudo reservar suficiente memoria para el disco %s",
       disco_usr->strEtiqueta);
  return -6;
 }
 disco_usr->pstDirRaiz = (void *) 0x80000;
 disco_usr->dwEntradasRaiz = 20;
 disco_usr->bActivo = 1;

 disco_log->dwTamanio = 2 * 1024 * 1024;

 if ((disco_log->dwDireccionInicial =
      (dword) pvFnReservarParticionUsuario(disco_log->dwTamanio)) == 0) {
  vFnImprimir
      ("\nNo se pudo reservar suficiente memoria para el disco %s",
       disco_log->strEtiqueta);
  return -6;
 }
 disco_log->pstDirRaiz = (void *) disco_log->dwDireccionInicial;
 disco_log->dwEntradasRaiz = 20;
 disco_log->bActivo = 1;

 disco_lotes->dwTamanio = 20 * 1024;

 if ((disco_lotes->dwDireccionInicial =
      (dword) pvFnReservarParticionUsuario(disco_lotes->dwTamanio)) == 0) {
  vFnImprimir
      ("\nNo se pudo reservar suficiente memoria para el disco %s",
       disco_lotes->strEtiqueta);
  return -6;
 }
 disco_lotes->pstDirRaiz = (void *) disco_lotes->dwDireccionInicial;
 disco_lotes->dwEntradasRaiz = 20;
 disco_lotes->bActivo = 1;

 return 0;

}
# 132 "ramfs.c"
int iFnNormalizarNomArch(const char *strNomArch83, char *strNomArch)
{
 int iN = 0, iJ = 0;
 for (iJ = 0; iJ < 8; iJ++) {
  if (strNomArch83[iJ] != ' ') {
   strNomArch[iN++] = strNomArch83[iJ];
  }
 }
 strNomArch[iN] = '.';
 iN++;
 for (iJ = 8; iJ < 11; iJ++) {
  if (strNomArch83[iJ] != ' ') {
   strNomArch[iN++] = strNomArch83[iJ];
  }
 }
 strNomArch[iN] = '\0';
 return iN;
}
# 175 "ramfs.c"
int iFnBuscarArchivo(stDirectorio * pstDir,
        char *strNombreArchivo, stEntradaLS ** ppstEntradaLSArchEnc)
{
 char strNomTemp[13];

 int iN;
 for (iN = 0; iN < 20; iN++) {
  iFnNormalizarNomArch(pstDir->stEnt[iN].strNombreArchivo,
         strNomTemp);
  if (iFnCompararCadenas(strNomTemp, strNombreArchivo) == 1) {
   *ppstEntradaLSArchEnc = (stEntradaLS *) & pstDir->stEnt[iN];
   return 0;
  }
 }
 *ppstEntradaLSArchEnc = 0;
 return -10;
}
# 205 "ramfs.c"
int iFnObtenerDirectorio(char *strPMontaje, stDirectorio ** ppstDir)
{
 stDiscoRAM *pstDisco;
 int iValRetorno;

 if ((iValRetorno = iFnObtenerDisco(strPMontaje, &pstDisco)) < 0) {
  *ppstDir = 0;
  return iValRetorno;
 }
 *ppstDir = (stDirectorio *) pstDisco->pstDirRaiz;
 return 0;
}
# 234 "ramfs.c"
int iFnObtenerDisco(char *strPMontaje, stDiscoRAM **ppstDisco)
{
 int iN;
 for (iN = 0; iN < 3; iN++) {
  if (iFnCompararCadenas
      (stDiscosRAM[iN].strPMontaje, strPMontaje) == 1) {
   if (stDiscosRAM[iN].bActivo == 1) {
    *ppstDisco = &stDiscosRAM[iN];
    return 0;
   } else {
    *ppstDisco = 0;
    return -11;
   }
  }
 }
 *ppstDisco = 0;
 return -10;

}
# 270 "ramfs.c"
int iFnRamFsLs(char *strParams)
{
 int iN = 0,
  iValRetorno;

 char strNombreArchTmp[13];

 stDirectorio *pstDir = 0;
 stDiscoRAM *pstDisco = 0;
 stEntradaLS *pstEntradaLS = 0;

 if ((iValRetorno = iFnObtenerDisco(strParams, &pstDisco)) < 0) {
  vFnImprimir("\nNo se pudo obtener el disco");
  return iValRetorno;
 }

 vFnImprimir("\nEtiqueta del volumen: %s, montado en %s",
      pstDisco->strEtiqueta, pstDisco->strPMontaje);

 pstDir = pstDisco->pstDirRaiz;

 vFnImprimir
     ("\nArchivo    \tTamanio (Bytes)\tDir.\t(Lineal)\t(Seg:Offset)\n");


 while ((pstDir->stEnt[iN].strNombreArchivo[0]) != ' ') {
  pstEntradaLS = &pstDir->stEnt[iN];





  ucpFnCopiarMemoria((unsigned char *) strNombreArchTmp, (unsigned char *) "           ", 12);
  iValRetorno = iFnNormalizarNomArch (pstEntradaLS->strNombreArchivo,
                strNombreArchTmp);
  strNombreArchTmp[iValRetorno]=' ';strNombreArchTmp[12]='\0';


  vFnImprimir ("%s\t%d\t\t\t%x\t\t%x:%x\n",
        strNombreArchTmp,
        pstEntradaLS->dwTamanio,
        ( (pstEntradaLS->wSeg) * 16 + (pstEntradaLS->wOff) ),

        pstEntradaLS->wSeg,
        pstEntradaLS->wOff
       );

  if (((iN + 1) % (pstuVentana[0].iAlto -
     1)) == 0 && iN > 0)
   cFnPausa();
  iN++;
 }
 vFnImprimir("\nEOD");
 return 0;
}
